<!doctype html><html xmlns="http://www.w3.org/1999/xhtml" id="html">
    <head>
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <base href="<?= base_url(1); ?>" />
        <link type="text/css" href="css/main.css?v=<?= $config['version'] ?>" rel="stylesheet" />
    </head>
    <body>
        <?php include(VIEWPATH . 'common/main_header.php'); ?>
        <div class="datalist"><table id="flexigrid" style="display:none"></table></div>
        <script type="text/javascript">
            $(function() {
                $("#flexigrid").flexigrid($.extend(SG.flexOptions, {
                    url: '<?= site_url('area/statistics/flexigrid') ?>',
                    colModel: [
                        //{display: 'ID', name: 'sa.id', width: '50', iskey: true, hide: true},
                        {display: '<?= translate('DATE') ?>', name: 'daytime', width: '100', process: formatSearch},
                        {display: '<?= translate('AREA_ID') ?>', name: 'sa.areaId', width: '100', process: formatSearch},
                        {display: '<?= translate('AREA_NAME') ?>', name: 'a.name', width: '100', process: formatSearch},
                        {display: '<?= translate('AREA_DNU') ?><font color=#D77037>(DNU)</font>', name: 'dnu', width: '90', process: formatSearch},
                        {display: '<?= translate('AREA_DAU') ?><font color=#D77037>(DAU)</font>', name: 'dau', width: '90', process: formatSearch},
                        {display: '<?= translate('AREA_PU') ?><font color=#D77037>(PU)</font>', name: 'pu', width: '90', process: formatSearch},
                        {display: '<?= translate('AREA_PR') ?><font color=#D77037>(PR)</font>', name: 'pr', width: '80', process: formatSearch},
                        {display: '<?= translate('AREA_ARPRU') ?><font color=#D77037>(ARPRU)</font><font color=blue>(<?= $config['currency_revenue'] ?>)</font>', name: 'arpru', width: '150', process: formatSearch},
                        {display: '<?= translate('AREA_ARPPU') ?><font color=#D77037>(ARPPU)</font><font color=blue>(<?= $config['currency_revenue'] ?>)</font>', name: 'arppu', width: '150', process: formatSearch},
                        {display: '<?= translate('AREA_REVENUE') ?><font color=#D77037>(REVENUE)</font><font color=blue>(<?= $config['currency_revenue'] ?>)</font>', name: 'revenue', width: '150', process: formatSearch},
                        {display: '<?= translate('AREA_REVENUE_DATA') ?>', name: 'revenuedata', width: '300'},
                    ],
                    buttons: [
                        {name: 'export', displayname: "<?= translate('EXPORT') ?>", bclass: 'export', onpress: multi},
                        {name: 'seldate', displayname: "<?= translate('DATE') ?> <input type='text' style='padding:1px;' value='' size='12' placeholder='<?= translate('STARTDATE') ?>' name='startdate' op='>=' class='datepicker'/>", bclass: 'add'},
                        {name: 'enddate', displayname: "<?= translate('TO') ?> <input type='text' style='padding:1px;' value='' size='12' placeholder='<?= translate('ENDDATE') ?>' name='enddate' op='<=' class='datepicker'/>", bclass: ''},
                    ],
                    searchitems: true,
                    sortname: "sa.id",
                    sortorder: "desc",
                }));
                SG.admin = $.extend(SG.admin, {
                    table: '{pre}area_statistics'
                });
            });
        </script>
    </body>
</html>